package test;

import javax.swing.JFrame;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class testSpeed extends JFrame{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 22902615316753215L;


	public testSpeed(){
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		getContentPane().setLayout(null);
		
		JButton btnNewButton = new JButton("New button");
		btnNewButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				long time = System.currentTimeMillis();
				for(long i = 0;i<1000000;){
					i++;
				}
				System.out.println(System.currentTimeMillis() - time);
			}
		});
		btnNewButton.setBounds(22, 33, 93, 23);
		getContentPane().add(btnNewButton);
		
	}
	

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		testSpeed test = new testSpeed();
		test.setVisible(true);
	}
}
